/*    */ package com.feeyin.radar.sys.dao.impl;
/*    */ 
/*    */ import com.feeyin.radar.commons.Page;
/*    */ import com.feeyin.radar.sys.dao.ModelLogDAO;
/*    */ import com.feeyin.radar.sys.model.ModelLog;
/*    */ import java.util.List;
/*    */ import org.springframework.orm.ibatis.SqlMapClientTemplate;
/*    */ import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
/*    */ 
/*    */ public class ModelLogDAOImpl extends SqlMapClientDaoSupport
/*    */   implements ModelLogDAO
/*    */ {
/*    */   public List getPageModelLogs(Page page)
/*    */   {
/* 20 */     if (page == null) return null;
/* 21 */     Integer count = getPageModelLogsCount();
/* 22 */     if ((count == null) || (count.intValue() <= 0)) return null;
/*    */ 
/* 24 */     ModelLog modelLog = new ModelLog();
/* 25 */     modelLog.setPageStartRow(page.getPageStartRow());
/* 26 */     modelLog.setPageEndRow(page.getPageEndRow());
/* 27 */     return getSqlMapClientTemplate().queryForList("getPageModelLogsByDynamic", modelLog);
/*    */   }
/*    */ 
/*    */   public Integer getPageModelLogsCount() {
/* 31 */     return (Integer)getSqlMapClientTemplate().queryForObject("getPageModelLogsCountByDynamic");
/*    */   }
/*    */ 
/*    */   public List getPageModelLogsByDynamic(ModelLog modelLog, Page page) {
/* 35 */     if (modelLog == null) return null;
/* 36 */     if (page == null) return null;
/* 37 */     modelLog.setPageStartRow(page.getPageStartRow());
/* 38 */     modelLog.setPageEndRow(page.getPageEndRow());
/* 39 */     return getSqlMapClientTemplate().queryForList("getPageModelLogsByDynamic", modelLog);
/*    */   }
/*    */ 
/*    */   public Integer getPageModelLogsCountByDynamic(ModelLog modelLog) {
/* 43 */     if (modelLog == null) return null;
/* 44 */     return (Integer)getSqlMapClientTemplate().queryForObject("getPageModelLogsCountByDynamic", modelLog);
/*    */   }
/*    */ 
/*    */   public boolean insertModelLog(ModelLog modelLog) {
/* 48 */     if (modelLog == null) return false;
/* 49 */     Integer result = (Integer)getSqlMapClientTemplate().insert("insertModelLog", modelLog);
/* 50 */     return result != null;
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.dao.impl.ModelLogDAOImpl
 * JD-Core Version:    0.6.0
 */